Optimal. Leaf size=320 \[ -\frac {2 (a-b) \sqrt {a+b} d \cot (e+f x) E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{b f}+\frac {2 \sqrt {a+b} (b (c-d)+a d) \cot (e+f x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{b f}-\frac {2 \sqrt {a+b} c \cot (e+f x) \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 320, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4001, 3869,
4090, 3917, 4089} \begin {gather*} \frac {2 \sqrt {a+b} (a d+b (c-d)) \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b f}-\frac {2 c \sqrt {a+b} \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{f}-\frac {2 d (a-b) \sqrt {a+b} \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3869
Rule 3917
Rule 4001
Rule 4089
Rule 4090
Rubi steps
\begin {align*} \int \sqrt {a+b \sec (e+f x)} (c+d \sec (e+f x)) \, dx &=(a c) \int \frac {1}{\sqrt {a+b \sec (e+f x)}} \, dx+\int \frac {\sec (e+f x) (b c+a d+b d \sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx\\ &=-\frac {2 \sqrt {a+b} c \cot (e+f x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{f}+(b d) \int \frac {\sec (e+f x) (1+\sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx+(b (c-d)+a d) \int \frac {\sec (e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx\\ &=-\frac {2 (a-b) \sqrt {a+b} d \cot (e+f x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{b f}+\frac {2 \sqrt {a+b} (b (c-d)+a d) \cot (e+f x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{b f}-\frac {2 \sqrt {a+b} c \cot (e+f x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 17.79, size = 913, normalized size = 2.85 \begin {gather*} \frac {2 d \cos (e+f x) \sqrt {a+b \sec (e+f x)} (c+d \sec (e+f x)) \sin (e+f x)}{f (d+c \cos (e+f x))}+\frac {2 \sqrt {a+b \sec (e+f x)} (c+d \sec (e+f x)) \left (a \sqrt {\frac {-a+b}{a+b}} d \tan \left (\frac {1}{2} (e+f x)\right )+b \sqrt {\frac {-a+b}{a+b}} d \tan \left (\frac {1}{2} (e+f x)\right )-2 a \sqrt {\frac {-a+b}{a+b}} d \tan ^3\left (\frac {1}{2} (e+f x)\right )+a \sqrt {\frac {-a+b}{a+b}} d \tan ^5\left (\frac {1}{2} (e+f x)\right )-b \sqrt {\frac {-a+b}{a+b}} d \tan ^5\left (\frac {1}{2} (e+f x)\right )+2 i a c \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (e+f x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+b \tan ^2\left (\frac {1}{2} (e+f x)\right )}{a+b}}+2 i a c \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a+b}{a-b}\right ) \tan ^2\left (\frac {1}{2} (e+f x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (e+f x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+b \tan ^2\left (\frac {1}{2} (e+f x)\right )}{a+b}}-i (a-b) d E\left (i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (e+f x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+b \tan ^2\left (\frac {1}{2} (e+f x)\right )}{a+b}}-i (a-b) (c-d) F\left (i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (e+f x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+b \tan ^2\left (\frac {1}{2} (e+f x)\right )}{a+b}}\right )}{\sqrt {\frac {-a+b}{a+b}} f \sqrt {b+a \cos (e+f x)} (d+c \cos (e+f x)) \sec ^{\frac {3}{2}}(e+f x) \sqrt {\frac {1}{1-\tan ^2\left (\frac {1}{2} (e+f x)\right )}} \left (-1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \left (1+\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )^{3/2} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (e+f x)\right )+b \tan ^2\left (\frac {1}{2} (e+f x)\right )}{1+\tan ^2\left (\frac {1}{2} (e+f x)\right )}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1371\) vs.
\(2(293)=586\).
time = 3.54, size = 1372, normalized size = 4.29
method | result | size |
default | \(\text {Expression too large to display}\) | \(1372\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \sec {\left (e + f x \right )}} \left (c + d \sec {\left (e + f x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \sqrt {a+\frac {b}{\cos \left (e+f\,x\right )}}\,\left (c+\frac {d}{\cos \left (e+f\,x\right )}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________